<?php
/*code here*/
$db = new Database();
$auth = Auth::getAuth('current_user');
$level = $auth['UserType'];
$user_level = $db->query("SELECT * FROM tbluser_level WHERE id='$level'","row");
if($user_level['level'] == "Admin" || $user_level['level'] == "Editor"){
    
}else{
     header('Location: /home'); 
}
if(Auth::hasAuth('current_user')){
    $this->view->current_user = Auth::getAuth('current_user');
}
else{
    header('location: /');
}
/*code here(end)*/
$this->setLayout();

 